<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP8!';
});

Route::get('hello/:name', 'index/hello');

//公共的
Route::group('openpkg',function(){
    //获取包版本信息
    Route::get('versions/:packageName','nest/versions');
    //获取包元数据信息
    Route::get('metadata/:packageName','nest/metadata');
});

//登录
Route::post('login','login/login');
//私有的
Route::group('pkg',function(){
    //检查版本号
    Route::get('checkVersionNumber/:packageName/:version','publish/checkVersionNumber');
    //上传包
    Route::post('updatePackage','publish/updatePackage');
});
